package com.deer.wms.base.system.service.bill.impl;

import com.deer.wms.base.system.dao.bill.MaterialDetailMapper;
import com.deer.wms.base.system.dao.bill.MaterialInfoMapper;
import com.deer.wms.base.system.model.MaterialEdit.MaterialEdit;
import com.deer.wms.base.system.model.bill.*;
import com.deer.wms.base.system.model.pda.Pdaweight;
import com.deer.wms.base.system.service.bill.IMaterialDetailService;
import com.deer.wms.base.system.service.bill.IMaterialInfoService;
import com.deer.wms.common.core.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MaterialDetailServiceImpl extends AbstractService<MaterialDetail, Integer> implements IMaterialDetailService{

    @Autowired
    MaterialDetailMapper materialDetailMapper;


    @Override
    public List<MaterialDetailDto> selectMaterialList(MaterialDetailCriteria criteria) {
        return materialDetailMapper.selectMaterialList(criteria);
    }

    @Override
    public List<MaterialDetailDto> findMaterialDetailBoxList(MaterialDetailCriteria criteria) {
        return materialDetailMapper.findMaterialDetailBoxList(criteria);
    }

    @Override
    public List<MaterialDetail> findList(MaterialDetailCriteria materialDetailCriteria) {
        return materialDetailMapper.findList(materialDetailCriteria);
    }

    @Override
    public List<MaterialDetail> findMaterialDetailList(String materialBatchId) {
        return materialDetailMapper.findMaterialDetailList(materialBatchId);
    }

    @Override
    public int insertMaterialDetail(MaterialDetail materialDetail) {
        return materialDetailMapper.insertMaterialDetail(materialDetail);
    }

    @Override
    public MaterialDetail findMaterialDetailByMaterialId(String materialId) {
        return materialDetailMapper.findMaterialDetailByMaterialId(materialId);
    }

    @Override
    public int delectMaterialDetail(Integer id) {
        return materialDetailMapper.delectMaterialDetail(id);
    }

    @Override
    public List<MaterialDetail> selectReturned(MaterialDetail materialDetail) {
        return materialDetailMapper.selectReturned(materialDetail);
    }

    @Override
    public List<MaterialDetail> selectCrystalByid(MaterialDetail materialDetail) {
        return materialDetailMapper.selectCrystalByid(materialDetail);
    }

    @Override
    public Pdaweight selectWeight(String bill_in_sap_detail_id) {
        return materialDetailMapper.selectWeight(bill_in_sap_detail_id);
    }

    @Override
    public Integer updateMaterial(MaterialDetail materialDetail) {
        return materialDetailMapper.updateMaterial(materialDetail);
    }

    @Override
    public int updatedetail(MaterialEdit materialEdit) {
        return materialDetailMapper.updatedetail(materialEdit);
    }

}
